/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InTaskCollection extends BasicModel<InTaskCollection> {
  taskId?: number; // 任务id
  tid?: string; // 任务编号
  taskTypeCode?: string; // 任务类型code
  taskTypeName?: string; // 任务类型名称
  taskStatus?: string; // 任务状态  已推送   已完成  已过期
  enterpriseCode?: string; // 所属企业code
  enterpriseName?: string; // 所属企业名称
  roleCode?: string; // 角色code
  roleName?: string; // 角色名称
  addTime?: string; // 创建时间
  updateTime?: string; // 更新时间
  receiveTime?: string; // 领取时间
  finishTime?: string; // 完成时间
  pushTime?: string; // 推送时间
}

export const inTaskCollectionList = (params?: InTaskCollection | any) =>
  defHttp.get<InTaskCollection>({ url: adminPath + '/inspectionmanag/inTaskCollection/list', params });

export const inTaskCollectionListData = (params?: any, data?: InTaskCollection | any) =>
  defHttp.post<Page<InTaskCollection>>({ url: adminPath + '/inspectionmanag/inTaskCollection/listData', params,data });

export const inTaskCollectionForm = (params?: InTaskCollection | any) =>
  defHttp.get<InTaskCollection>({ url: adminPath + '/inspectionmanag/inTaskCollection/form', params });

export const inTaskCollectionSave = (params?: any, data?: InTaskCollection | any) =>
  defHttp.postJson<InTaskCollection>({ url: adminPath + '/inspectionmanag/inTaskCollection/save', params, data });

export const inTaskCollectionDelete = (params?: InTaskCollection | any) =>
  defHttp.get<InTaskCollection>({ url: adminPath + '/inspectionmanag/inTaskCollection/delete', params });
